import request from "@/axios/axios.ts";
import {HandleGroupCRUD, HandleGroupFuzzySearch, HandleGroupUse} from "./type.ts";

enum API1 {
    A = '/inventory/handle_group_crud',
    B = '/inventory/handle_group_fuzzy_search',
    C = '/inventory/handle_group_deactivation_and_activation'
}

// 处理方分组增删改查
export const reqHandleGroupCRUD = (data: HandleGroupCRUD): Promise<any> => {
    return request.post<any, any>(API1.A, data)
}

// 处理方分组模糊搜索
export const reqHandleGroupFuzzySearch = (data: HandleGroupFuzzySearch): Promise<any> => {
    return request.post<any, any>(API1.B, data)
}

// 处理方分组的停用和启用
export const req_handle_group_deactivation_and_activation = (data: HandleGroupUse): Promise<any> => {
    return request.post<any, any>(API1.C, data)
}
